//
//  DJIMapViewController.h
//  GSDemo
//
//  Created by DJI on 7/7/15.
//  Copyright (c) 2015 DJI. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <MapKit/MapKit.h>
#import "DJIAircraftAnnotation.h"

@interface DJIMapController : NSObject
@property (nonatomic, strong) NSMutableArray *latArr;
@property (nonatomic, strong) NSMutableArray *lngArr;
@property (strong, nonatomic) NSMutableArray *editPoints;
@property (nonatomic, strong) DJIAircraftAnnotation* aircraftAnnotation;
@property (nonatomic, assign) CLLocationCoordinate2D coorS;//航线出发点坐标
@property (nonatomic, assign) CLLocationCoordinate2D coorE;//航线结束点坐标
/** 是否设置完毕*/
@property (nonatomic, assign) BOOL isFinishedSet;
/** 是否可以拍照*/
@property (nonatomic, assign) BOOL isCouldTakePhoto;
@property (copy, nonatomic) void(^takePhotoBlock)();
@property (copy, nonatomic) void(^sDisAndTotalDisBlock)(NSString *sDis,NSString *totalDis);
/** 线路总长度*/
@property (nonatomic, assign) CGFloat totalLineDistance;
/**
 *  Add Waypoints in Map View
 */
- (void)addPoint:(CGPoint)point withMapView:(MKMapView *)mapView;

/**
 *  Clean All Waypoints in Map View
 */
- (void)cleanAllPointsWithMapView:(MKMapView *)mapView;

/**
 *  Update Aircraft's location in Map View
 */
-(void)updateAircraftLocation:(CLLocationCoordinate2D)location withMapView:(MKMapView *)mapView;

/**
 *  Update Aircraft's heading in Map View
 */
-(void)updateAircraftHeading:(float)heading;

/**
 *  Current Edit Points
 *
 *  @return Return an NSArray contains multiple CCLocation objects
 */
- (NSArray *)wayPoints;

/**
 *画飞行边界
 */
- (void)drawFlyLine;

/**
 *画飞行航线
 */
- (void)drawFlyDoneLine;

@property (strong, nonatomic)  UIButton *editBtn;
/**
 *航线节点返参
 *出参：节点经纬度
 */
@property (nonatomic, copy) void(^airCraftLineBlock)(NSString *str);

/**
 *设置航线总长度
 */
- (void)setTotalLineDistance:(CGFloat )distance;

/**
 *设置航线开始点，结束点坐标
 */
- (void)setLineStartCLLocation:(CLLocation*)coorS EndCLLocation:(CLLocation*)coorE;

/**
 *清除无人机距离出发点的距离数据 和 全部航程数据
 */
- (void)clearSDisAndTotalLinDis;

/**
 *停止拍照数据回调
 */
- (void)stopTakePhoto;

/**
 *重置航线
 */
- (void)reSetAirCraftLine:(NSString *)angle FlyHeight:(NSString *)flyHeight;

/**
 *根据frontOverLay重置拍摄间隔
 */
- (void)reSetTakePhotoTime:(NSString *)frontOverLay;
@end

